<?php

class Empeval_Methods_Data_TaskGoals {
	
	public $id;
	public $bonusGoalDesc;
	public $weight;
	public $realization80;
	public $realization100;
	public $monitoring;
	public $selfAppraisalId;
	public $resultAchieved;
	public $result;
	public $weightResult;
	public $comment;
	public $status;
	public $lastModified;
	public $created;
	public $qualityCriteria = null;
	
	public function __construct(EmpevalTaskGoals $taskGoals) {
		$this->id = $taskGoals->getId();
		$this->bonusGoalDesc = $taskGoals->getBonusGoalDesc();
		$this->weight = $taskGoals->getWeight();
		$this->realization80 = $taskGoals->getRealization80();
		$this->realization100 = $taskGoals->getRealization100();
		$this->monitoring = $taskGoals->getMonitoring();
		$this->selfAppraisalId = $taskGoals->getSelfAppraisalId();
		$this->resultAchieved = $taskGoals->getResultAchieved();
		$this->result = ($taskGoals->getResult() == null) ? 0 : $taskGoals->getResult();
		$this->weightResult = ($taskGoals->getWeightResult() == null) ? 0 : $taskGoals->getWeightResult();
		$this->comment = $taskGoals->getComment();
		$this->status = $taskGoals->getStatus();
		$this->lastModified = $taskGoals->getLastModified();
		$this->created = $taskGoals->getCreated();
		if ($taskGoals->getQualityCriteria() instanceof EmpevalQualityCriteria)
			$this->qualityCriteria = new Empeval_Methods_Data_QualityCriteria($taskGoals->getQualityCriteria());
	}
	
}